x86: force EFLAGS.IF on when exiting to PV guests
authorJan Beulich <jbeulich@suse.com>
Wed, 21 Dec 2016 15:00:32 +0000 (15:00 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 22 Dec 2016 17:16:53 +0000 (17:16 +0000)
commit29982087979f3a6157eeadf1549c5ba59ac8d967
treeea30c1219bb68a0f2196c12e28bca5801ad53eb3
parentb884bbf759f32bc243edca86928c01ae695bcc4b
x86: force EFLAGS.IF on when exiting to PV guests

Guest kernels modifying instructions in the process of being emulated
for another of their vCPU-s may effect EFLAGS.IF to be cleared upon
next exiting to guest context, by converting the being emulated
instruction to CLI (at the right point in time). Prevent any such bad
effects by always forcing EFLAGS.IF on. And to cover hypothetical other
similar issues, also force EFLAGS.{IOPL,NT,VM} to zero.

This is XSA-202.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/x86_64/compat/entry.S
xen/arch/x86/x86_64/entry.S